package vip.xiaonuo.issued.controller.iot;

import cn.hutool.core.lang.Snowflake;

import java.util.HashMap;
import java.util.Map;

public class SnowIdGen {

    public static final Snowflake snowflake = new Snowflake(0, 0);

    public static Long nextId() {
        return snowflake.nextId();
    }

    public static Map<String, Object> getBaseMap() {
        Map<String, Object> map = new HashMap<>();
        map.put("serial_number", SnowIdGen.nextId());
        map.put("key", "ABCD1234");
        return map;
    }
}
